#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename base_csbuf.py
# package ptl



# message Point
class Point:
	def __init__(self):
		self.protoid = 0
		self.x = 0
		self.y = 0

	def Marshal(writer):
		writer.setFloat(self.x, 1)
		writer.setFloat(self.y, 2)

	def Unmarshal( reader):
		self.x = reader.getFloat(1)
		self.y = reader.getFloat(2)
# message Rect
class Rect:
	def __init__(self):
		self.protoid = 0
		self.x = 0
		self.y = 0
		self.w = 0
		self.h = 0

	def Marshal(writer):
		writer.setInt16(self.x, 1)
		writer.setInt16(self.y, 2)
		writer.setInt16(self.w, 3)
		writer.setInt16(self.h, 4)

	def Unmarshal( reader):
		self.x = reader.getInt16(1)
		self.y = reader.getInt16(2)
		self.w = reader.getInt16(3)
		self.h = reader.getInt16(4)
# message IntArray
class IntArray:
	def __init__(self):
		self.protoid = 0
		self.props = []

	def Marshal(writer):
		countprops = len(self.props)
		writer.setArray(countprops, 1)
		for i in range(countprops):
			writer.setUint32(self.props[i], 0)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			self.props.append(reader.getUint32(0))
# message AutoCmd
class AutoCmd:
	def __init__(self):
		self.protoid = 0
		self.cmdId = 0
		self.data = ""

	def Marshal(writer):
		writer.setInt32(self.cmdId, 1)
		writer.setString(self.data, 2)

	def Unmarshal( reader):
		self.cmdId = reader.getInt32(1)
		self.data = reader.getString(2)
# message AutoCmdArray
class AutoCmdArray:
	def __init__(self):
		self.protoid = 0
		self.cmds = []

	def Marshal(writer):
		countcmds = len(self.cmds)
		writer.setArray(countcmds, 1)
		for i in range(countcmds):
			writer.setMessage(0)
			self.cmds[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = AutoCmd() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.cmds.append(msg)
# message PairData
class PairData:
	def __init__(self):
		self.protoid = 0
		self.data1 = 0
		self.data2 = 0

	def Marshal(writer):
		writer.setInt32(self.data1, 1)
		writer.setInt32(self.data2, 2)

	def Unmarshal( reader):
		self.data1 = reader.getInt32(1)
		self.data2 = reader.getInt32(2)
# message TripleData
class TripleData:
	def __init__(self):
		self.protoid = 0
		self.data1 = 0
		self.data2 = 0
		self.data3 = 0

	def Marshal(writer):
		writer.setUint32(self.data1, 1)
		writer.setUint32(self.data2, 2)
		writer.setUint32(self.data3, 3)

	def Unmarshal( reader):
		self.data1 = reader.getUint32(1)
		self.data2 = reader.getUint32(2)
		self.data3 = reader.getUint32(3)
# message BenisonInfo
class BenisonInfo:
	def __init__(self):
		self.protoid = 0
		self.benisonLv = 0
		self.benisonId = 0

	def Marshal(writer):
		writer.setUint16(self.benisonLv, 1)
		writer.setUint32(self.benisonId, 2)

	def Unmarshal( reader):
		self.benisonLv = reader.getUint16(1)
		self.benisonId = reader.getUint32(2)
# message BenisonStairsInfo
class BenisonStairsInfo:
	def __init__(self):
		self.protoid = 0
		self.stairsLv = 0
		self.arrBenisonInfo = []

	def Marshal(writer):
		writer.setUint16(self.stairsLv, 1)
		countarrBenisonInfo = len(self.arrBenisonInfo)
		writer.setArray(countarrBenisonInfo, 2)
		for i in range(countarrBenisonInfo):
			writer.setMessage(0)
			self.arrBenisonInfo[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.stairsLv = reader.getUint16(1)
		for i in range(reader.getArray(2)):
			msg = BenisonInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrBenisonInfo.append(msg)
# message FightPropInfo
class FightPropInfo:
	def __init__(self):
		self.protoid = 0
		self.propLv = 0
		self.propId = 0

	def Marshal(writer):
		writer.setUint32(self.propLv, 1)
		writer.setUint32(self.propId, 2)

	def Unmarshal( reader):
		self.propLv = reader.getUint32(1)
		self.propId = reader.getUint32(2)
# message MoreHeroInfo
class MoreHeroInfo:
	def __init__(self):
		self.protoid = 0
		self.heroId = 0
		self.suitId = 0
		self.blood = 0
		self.isDead = 0

	def Marshal(writer):
		writer.setUint32(self.heroId, 1)
		writer.setUint32(self.suitId, 2)
		writer.setUint32(self.blood, 3)
		writer.setBool(self.isDead, 4)

	def Unmarshal( reader):
		self.heroId = reader.getUint32(1)
		self.suitId = reader.getUint32(2)
		self.blood = reader.getUint32(3)
		self.isDead = reader.getBool(4)
# message MoreNpcInfo
class MoreNpcInfo:
	def __init__(self):
		self.protoid = 0
		self.npcId = 0
		self.blood = 0
		self.isDead = 0

	def Marshal(writer):
		writer.setUint32(self.npcId, 1)
		writer.setUint32(self.blood, 2)
		writer.setUint32(self.isDead, 3)

	def Unmarshal( reader):
		self.npcId = reader.getUint32(1)
		self.blood = reader.getUint32(2)
		self.isDead = reader.getUint32(3)
# message MoreHeroTimes
class MoreHeroTimes:
	def __init__(self):
		self.protoid = 0
		self.levelId = 0
		self.enter_times = 0
		self.isPass = 0

	def Marshal(writer):
		writer.setUint32(self.levelId, 1)
		writer.setUint32(self.enter_times, 2)
		writer.setBool(self.isPass, 3)

	def Unmarshal( reader):
		self.levelId = reader.getUint32(1)
		self.enter_times = reader.getUint32(2)
		self.isPass = reader.getBool(3)
# message MoreHeroEnterTimes
class MoreHeroEnterTimes:
	def __init__(self):
		self.protoid = 0
		self.levelId = 0
		self.times = 0

	def Marshal(writer):
		writer.setUint32(self.levelId, 1)
		writer.setUint32(self.times, 2)

	def Unmarshal( reader):
		self.levelId = reader.getUint32(1)
		self.times = reader.getUint32(2)
# message HeroInfo
class HeroInfo:
	def __init__(self):
		self.protoid = 0
		self.heroStatus = 0
		self.heroId = 0
		self.star = 0
		self.strength_level = 0
		self.level = 0
		self.exp = 0
		self.suitId = 0

	def Marshal(writer):
		writer.setUint8(self.heroStatus, 1)
		writer.setUint32(self.heroId, 2)
		writer.setUint32(self.star, 3)
		writer.setUint32(self.strength_level, 4)
		writer.setUint32(self.level, 5)
		writer.setUint32(self.exp, 6)
		writer.setUint32(self.suitId, 7)

	def Unmarshal( reader):
		self.heroStatus = reader.getUint8(1)
		self.heroId = reader.getUint32(2)
		self.star = reader.getUint32(3)
		self.strength_level = reader.getUint32(4)
		self.level = reader.getUint32(5)
		self.exp = reader.getUint32(6)
		self.suitId = reader.getUint32(7)
# message GoodsInfo
class GoodsInfo:
	def __init__(self):
		self.protoid = 0
		self.goodsNum = 0
		self.goodsId = 0
		self.stackId = 0
		self.id = 0
		self.where = 0

	def Marshal(writer):
		writer.setUint32(self.goodsNum, 1)
		writer.setUint32(self.goodsId, 2)
		writer.setUint32(self.stackId, 3)
		writer.setUint64(self.id, 4)
		writer.setUint8(self.where, 5)

	def Unmarshal( reader):
		self.goodsNum = reader.getUint32(1)
		self.goodsId = reader.getUint32(2)
		self.stackId = reader.getUint32(3)
		self.id = reader.getUint64(4)
		self.where = reader.getUint8(5)
# message FightSkills
class FightSkills:
	def __init__(self):
		self.protoid = 0
		self.skill1 = 0
		self.skill2 = 0
		self.skill3 = 0
		self.index = 0

	def Marshal(writer):
		writer.setUint32(self.skill1, 1)
		writer.setUint32(self.skill2, 2)
		writer.setUint32(self.skill3, 3)
		writer.setUint32(self.index, 4)

	def Unmarshal( reader):
		self.skill1 = reader.getUint32(1)
		self.skill2 = reader.getUint32(2)
		self.skill3 = reader.getUint32(3)
		self.index = reader.getUint32(4)
# message FightProps
class FightProps:
	def __init__(self):
		self.protoid = 0
		self.prop1 = 0
		self.prop2 = 0
		self.battleType = 0
		self.index = 0

	def Marshal(writer):
		writer.setUint32(self.prop1, 1)
		writer.setUint32(self.prop2, 2)
		writer.setUint32(self.battleType, 3)
		writer.setUint32(self.index, 4)

	def Unmarshal( reader):
		self.prop1 = reader.getUint32(1)
		self.prop2 = reader.getUint32(2)
		self.battleType = reader.getUint32(3)
		self.index = reader.getUint32(4)
# message FightHeros
class FightHeros:
	def __init__(self):
		self.protoid = 0
		self.heroId = 0
		self.battleType = 0
		self.index = 0

	def Marshal(writer):
		writer.setUint32(self.heroId, 1)
		writer.setUint32(self.battleType, 2)
		writer.setUint32(self.index, 3)

	def Unmarshal( reader):
		self.heroId = reader.getUint32(1)
		self.battleType = reader.getUint32(2)
		self.index = reader.getUint32(3)
# message UserInfo
class UserInfo:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.name = ""
		self.headPic = ""
		self.spouseId = ""
		self.vipLv = 0
		self.level = 0
		self.maxPropLvCounts = 0
		self.rateOfWinning = 0
		self.maxAp = 0
		self.propsPoint = 0
		self.lvExperiences = 0
		self.vipExperiences = 0
		self.currentHeroId = 0
		self.selectedHerosId = 0
		self.selectedSuitsId = 0
		self.selectedPropsId = []
		self.apInterval = 0
		self.guildId = 0
		self.arrEquipGroove = []
		self.guideIndex = 0
		self.pwScore = 0
		self.roleSkills = FightSkills()
		self.fight = 0
		self.heros = []
		self.zone = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setString(self.headPic, 3)
		writer.setString(self.spouseId, 4)
		writer.setUint16(self.vipLv, 5)
		writer.setUint16(self.level, 6)
		writer.setUint16(self.maxPropLvCounts, 8)
		writer.setUint16(self.rateOfWinning, 9)
		writer.setUint16(self.maxAp, 11)
		writer.setUint16(self.propsPoint, 12)
		writer.setUint32(self.lvExperiences, 13)
		writer.setUint32(self.vipExperiences, 14)
		writer.setUint32(self.currentHeroId, 15)
		writer.setUint32(self.selectedHerosId, 16)
		writer.setUint32(self.selectedSuitsId, 17)
		countselectedPropsId = len(self.selectedPropsId)
		writer.setArray(countselectedPropsId, 18)
		for i in range(countselectedPropsId):
			writer.setMessage(0)
			self.selectedPropsId[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.apInterval, 19)
		writer.setUint32(self.guildId, 20)
		countarrEquipGroove = len(self.arrEquipGroove)
		writer.setArray(countarrEquipGroove, 21)
		for i in range(countarrEquipGroove):
			writer.setUint8(self.arrEquipGroove[i], 0)
		writer.setUint32(self.guideIndex, 22)
		writer.setUint32(self.pwScore, 23)
		writer.setMessage(24)
		self.roleSkills.Marshal(writer)
		writer.endSetMessage()
		writer.setUint32(self.fight, 25)
		countheros = len(self.heros)
		writer.setArray(countheros, 26)
		for i in range(countheros):
			writer.setMessage(0)
			self.heros[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.zone, 27)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.headPic = reader.getString(3)
		self.spouseId = reader.getString(4)
		self.vipLv = reader.getUint16(5)
		self.level = reader.getUint16(6)
		self.maxPropLvCounts = reader.getUint16(8)
		self.rateOfWinning = reader.getUint16(9)
		self.maxAp = reader.getUint16(11)
		self.propsPoint = reader.getUint16(12)
		self.lvExperiences = reader.getUint32(13)
		self.vipExperiences = reader.getUint32(14)
		self.currentHeroId = reader.getUint32(15)
		self.selectedHerosId = reader.getUint32(16)
		self.selectedSuitsId = reader.getUint32(17)
		for i in range(reader.getArray(18)):
			msg = FightProps() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.selectedPropsId.append(msg)
		self.apInterval = reader.getUint32(19)
		self.guildId = reader.getUint32(20)
		for i in range(reader.getArray(21)):
			self.arrEquipGroove.append(reader.getUint8(0))
		self.guideIndex = reader.getUint32(22)
		self.pwScore = reader.getUint32(23)
		reader.getMessage(24)
		self.roleSkills.Unmarshal(reader)
		reader.endGetMessage()
		self.fight = reader.getUint32(25)
		for i in range(reader.getArray(26)):
			msg = FightHeros() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.heros.append(msg)
		self.zone = reader.getUint32(27)
# message BattleDailyResult
class BattleDailyResult:
	def __init__(self):
		self.protoid = 0
		self.pvpType = 0
		self.battleType = 0
		self.total = 0
		self.win = 0
		self.killNum = 0
		self.damage = 0

	def Marshal(writer):
		writer.setUint8(self.pvpType, 1)
		writer.setUint8(self.battleType, 2)
		writer.setUint32(self.total, 3)
		writer.setUint32(self.win, 4)
		writer.setUint64(self.killNum, 5)
		writer.setUint32(self.damage, 6)

	def Unmarshal( reader):
		self.pvpType = reader.getUint8(1)
		self.battleType = reader.getUint8(2)
		self.total = reader.getUint32(3)
		self.win = reader.getUint32(4)
		self.killNum = reader.getUint64(5)
		self.damage = reader.getUint32(6)
# message NormalUserInfo
class NormalUserInfo:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.name = ""
		self.headPic = ""
		self.spouseId = ""
		self.vipLv = 0
		self.level = 0
		self.rateOfWinning = 0
		self.maxHp = 0
		self.guildId = 0
		self.currentHeroId = 0
		self.currentHeroSuitId = 0
		self.props = FightProps()
		self.equipInfos = []
		self.pwScore = 0
		self.userType = 0
		self.online = 0
		self.roleSkills = FightSkills()
		self.fight = 0
		self.difficulty = 0
		self.attack = 0
		self.defense = 0
		self.index = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setString(self.headPic, 3)
		writer.setString(self.spouseId, 4)
		writer.setUint16(self.vipLv, 5)
		writer.setUint16(self.level, 6)
		writer.setUint16(self.rateOfWinning, 7)
		writer.setUint32(self.maxHp, 8)
		writer.setUint32(self.guildId, 9)
		writer.setUint32(self.currentHeroId, 10)
		writer.setUint32(self.currentHeroSuitId, 11)
		writer.setMessage(12)
		self.props.Marshal(writer)
		writer.endSetMessage()
		countequipInfos = len(self.equipInfos)
		writer.setArray(countequipInfos, 13)
		for i in range(countequipInfos):
			writer.setMessage(0)
			self.equipInfos[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.pwScore, 14)
		writer.setUint8(self.userType, 15)
		writer.setUint8(self.online, 16)
		writer.setMessage(17)
		self.roleSkills.Marshal(writer)
		writer.endSetMessage()
		writer.setUint64(self.fight, 18)
		writer.setUint8(self.difficulty, 19)
		writer.setUint32(self.attack, 20)
		writer.setUint32(self.defense, 21)
		writer.setUint32(self.index, 22)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.headPic = reader.getString(3)
		self.spouseId = reader.getString(4)
		self.vipLv = reader.getUint16(5)
		self.level = reader.getUint16(6)
		self.rateOfWinning = reader.getUint16(7)
		self.maxHp = reader.getUint32(8)
		self.guildId = reader.getUint32(9)
		self.currentHeroId = reader.getUint32(10)
		self.currentHeroSuitId = reader.getUint32(11)
		reader.getMessage(12)
		self.props.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(13)):
			msg = EquipInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.equipInfos.append(msg)
		self.pwScore = reader.getUint32(14)
		self.userType = reader.getUint8(15)
		self.online = reader.getUint8(16)
		reader.getMessage(17)
		self.roleSkills.Unmarshal(reader)
		reader.endGetMessage()
		self.fight = reader.getUint64(18)
		self.difficulty = reader.getUint8(19)
		self.attack = reader.getUint32(20)
		self.defense = reader.getUint32(21)
		self.index = reader.getUint32(22)
# message Level
class Level:
	def __init__(self):
		self.protoid = 0
		self.starNum = 0
		self.challengeTimes = 0
		self.levelId = 0
		self.chapterId = 0
		self.chapterType = 0

	def Marshal(writer):
		writer.setUint8(self.starNum, 1)
		writer.setUint16(self.challengeTimes, 2)
		writer.setUint32(self.levelId, 3)
		writer.setUint32(self.chapterId, 4)
		writer.setUint8(self.chapterType, 5)

	def Unmarshal( reader):
		self.starNum = reader.getUint8(1)
		self.challengeTimes = reader.getUint16(2)
		self.levelId = reader.getUint32(3)
		self.chapterId = reader.getUint32(4)
		self.chapterType = reader.getUint8(5)
# message Chapter
class Chapter:
	def __init__(self):
		self.protoid = 0
		self.chapterId = 0
		self.levels = []
		self.boxIndex = []

	def Marshal(writer):
		writer.setUint32(self.chapterId, 1)
		countlevels = len(self.levels)
		writer.setArray(countlevels, 2)
		for i in range(countlevels):
			writer.setMessage(0)
			self.levels[i].Marshal(writer)
			writer.endSetMessage()
		countboxIndex = len(self.boxIndex)
		writer.setArray(countboxIndex, 3)
		for i in range(countboxIndex):
			writer.setUint8(self.boxIndex[i], 0)

	def Unmarshal( reader):
		self.chapterId = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			msg = Level() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.levels.append(msg)
		for i in range(reader.getArray(3)):
			self.boxIndex.append(reader.getUint8(0))
# message ChapterBox
class ChapterBox:
	def __init__(self):
		self.protoid = 0
		self.chatperId = 0
		self.boxIndex = 0

	def Marshal(writer):
		writer.setUint32(self.chatperId, 1)
		writer.setUint8(self.boxIndex, 2)

	def Unmarshal( reader):
		self.chatperId = reader.getUint32(1)
		self.boxIndex = reader.getUint8(2)
# message RewardInfo
class RewardInfo:
	def __init__(self):
		self.protoid = 0
		self.rewardNum = 0
		self.rewardId = 0

	def Marshal(writer):
		writer.setUint16(self.rewardNum, 1)
		writer.setUint32(self.rewardId, 2)

	def Unmarshal( reader):
		self.rewardNum = reader.getUint16(1)
		self.rewardId = reader.getUint32(2)
# message EquipGradeInfo
class EquipGradeInfo:
	def __init__(self):
		self.protoid = 0
		self.goodsId = 0
		self.count = 0

	def Marshal(writer):
		writer.setUint32(self.goodsId, 1)
		writer.setUint32(self.count, 2)

	def Unmarshal( reader):
		self.goodsId = reader.getUint32(1)
		self.count = reader.getUint32(2)
# message EquipInfo
class EquipInfo:
	def __init__(self):
		self.protoid = 0
		self.position = 0
		self.equipLv = 0
		self.equipId = 0
		self.goods = []

	def Marshal(writer):
		writer.setUint8(self.position, 1)
		writer.setUint16(self.equipLv, 2)
		writer.setUint32(self.equipId, 3)
		countgoods = len(self.goods)
		writer.setArray(countgoods, 4)
		for i in range(countgoods):
			writer.setMessage(0)
			self.goods[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.position = reader.getUint8(1)
		self.equipLv = reader.getUint16(2)
		self.equipId = reader.getUint32(3)
		for i in range(reader.getArray(4)):
			msg = EquipGradeInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.goods.append(msg)
# message BattleParam
class BattleParam:
	def __init__(self):
		self.protoid = 0
		self.bid = ""
		self.playerId = 0
		self.roomId = ""
		self.battleType = 0
		self.status = 0

	def Marshal(writer):
		writer.setString(self.bid, 201)
		writer.setUint32(self.playerId, 202)
		writer.setString(self.roomId, 203)
		writer.setUint8(self.battleType, 204)
		writer.setUint32(self.status, 205)

	def Unmarshal( reader):
		self.bid = reader.getString(201)
		self.playerId = reader.getUint32(202)
		self.roomId = reader.getString(203)
		self.battleType = reader.getUint8(204)
		self.status = reader.getUint32(205)
# message PropStatu
class PropStatu:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.count = 0
		self.cd = 0

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setInt16(self.count, 2)
		writer.setInt16(self.cd, 3)

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.count = reader.getInt16(2)
		self.cd = reader.getInt16(3)
# message BattlePlayerInfo
class BattlePlayerInfo:
	def __init__(self):
		self.protoid = 0
		self.teamId = 0
		self.curDir = 0
		self.status = 0
		self.entityType = 0
		self.curAnger = 0
		self.curEp = 0
		self.maxEp = 0
		self.level = 0
		self.curHp = 0
		self.maxHp = 0
		self.heroId = 0
		self.priority = 0
		self.playerId = 0
		self.bpUUID = ""
		self.pos = Point()
		self.arrSkillBuff = []
		self.currentHeroSuitId = 0
		self.name = ""
		self.userType = 0
		self.propStatus = []
		self.speed = Point()
		self.beAttBox = Rect()
		self.hurtBox = Rect()
		self.moveBox = Rect()
		self.nogoAreaBox = Rect()
		self.beAttackCount = 0
		self.attack = 0
		self.defense = 0
		self.usedSkills = []
		self.online = 0

	def Marshal(writer):
		writer.setUint8(self.teamId, 1)
		writer.setUint8(self.curDir, 2)
		writer.setUint8(self.status, 3)
		writer.setUint8(self.entityType, 4)
		writer.setUint16(self.curAnger, 5)
		writer.setUint16(self.curEp, 6)
		writer.setUint16(self.maxEp, 7)
		writer.setUint16(self.level, 8)
		writer.setUint32(self.curHp, 9)
		writer.setUint32(self.maxHp, 10)
		writer.setUint32(self.heroId, 11)
		writer.setInt32(self.priority, 12)
		writer.setUint32(self.playerId, 13)
		writer.setString(self.bpUUID, 14)
		writer.setMessage(15)
		self.pos.Marshal(writer)
		writer.endSetMessage()
		countarrSkillBuff = len(self.arrSkillBuff)
		writer.setArray(countarrSkillBuff, 16)
		for i in range(countarrSkillBuff):
			writer.setMessage(0)
			self.arrSkillBuff[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.currentHeroSuitId, 17)
		writer.setString(self.name, 18)
		writer.setUint8(self.userType, 19)
		countpropStatus = len(self.propStatus)
		writer.setArray(countpropStatus, 20)
		for i in range(countpropStatus):
			writer.setMessage(0)
			self.propStatus[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(21)
		self.speed.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(22)
		self.beAttBox.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(23)
		self.hurtBox.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(24)
		self.moveBox.Marshal(writer)
		writer.endSetMessage()
		writer.setMessage(25)
		self.nogoAreaBox.Marshal(writer)
		writer.endSetMessage()
		writer.setInt16(self.beAttackCount, 26)
		writer.setUint32(self.attack, 27)
		writer.setUint32(self.defense, 28)
		countusedSkills = len(self.usedSkills)
		writer.setArray(countusedSkills, 29)
		for i in range(countusedSkills):
			writer.setUint32(self.usedSkills[i], 0)
		writer.setUint8(self.online, 30)

	def Unmarshal( reader):
		self.teamId = reader.getUint8(1)
		self.curDir = reader.getUint8(2)
		self.status = reader.getUint8(3)
		self.entityType = reader.getUint8(4)
		self.curAnger = reader.getUint16(5)
		self.curEp = reader.getUint16(6)
		self.maxEp = reader.getUint16(7)
		self.level = reader.getUint16(8)
		self.curHp = reader.getUint32(9)
		self.maxHp = reader.getUint32(10)
		self.heroId = reader.getUint32(11)
		self.priority = reader.getInt32(12)
		self.playerId = reader.getUint32(13)
		self.bpUUID = reader.getString(14)
		reader.getMessage(15)
		self.pos.Unmarshal(reader)
		reader.endGetMessage()
		for i in range(reader.getArray(16)):
			msg = PairData() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrSkillBuff.append(msg)
		self.currentHeroSuitId = reader.getUint32(17)
		self.name = reader.getString(18)
		self.userType = reader.getUint8(19)
		for i in range(reader.getArray(20)):
			msg = PropStatu() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.propStatus.append(msg)
		reader.getMessage(21)
		self.speed.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(22)
		self.beAttBox.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(23)
		self.hurtBox.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(24)
		self.moveBox.Unmarshal(reader)
		reader.endGetMessage()
		reader.getMessage(25)
		self.nogoAreaBox.Unmarshal(reader)
		reader.endGetMessage()
		self.beAttackCount = reader.getInt16(26)
		self.attack = reader.getUint32(27)
		self.defense = reader.getUint32(28)
		for i in range(reader.getArray(29)):
			self.usedSkills.append(reader.getUint32(0))
		self.online = reader.getUint8(30)
# message BattleTeams
class BattleTeams:
	def __init__(self):
		self.protoid = 0
		self.teamId = 0
		self.arrBattlePlayerInfo = []

	def Marshal(writer):
		writer.setUint8(self.teamId, 1)
		countarrBattlePlayerInfo = len(self.arrBattlePlayerInfo)
		writer.setArray(countarrBattlePlayerInfo, 2)
		for i in range(countarrBattlePlayerInfo):
			writer.setMessage(0)
			self.arrBattlePlayerInfo[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.teamId = reader.getUint8(1)
		for i in range(reader.getArray(2)):
			msg = BattlePlayerInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrBattlePlayerInfo.append(msg)
# message RoomPlayerInfo
class RoomPlayerInfo:
	def __init__(self):
		self.protoid = 0
		self.teamId = 0
		self.status = 0
		self.normalUserInfo = NormalUserInfo()
		self.hostId = 0

	def Marshal(writer):
		writer.setUint8(self.teamId, 1)
		writer.setUint8(self.status, 2)
		writer.setMessage(3)
		self.normalUserInfo.Marshal(writer)
		writer.endSetMessage()
		writer.setUint32(self.hostId, 4)

	def Unmarshal( reader):
		self.teamId = reader.getUint8(1)
		self.status = reader.getUint8(2)
		reader.getMessage(3)
		self.normalUserInfo.Unmarshal(reader)
		reader.endGetMessage()
		self.hostId = reader.getUint32(4)
# message PVPRoomInfo
class PVPRoomInfo:
	def __init__(self):
		self.protoid = 0
		self.battleType = 0
		self.perRoundTime = 0
		self.endRoundNum = 0
		self.roomId = ""
		self.levelId = 0
		self.hostId = 0
		self.status = 0
		self.arrRoomPlayerInfo = []
		self.pvpType = 0
		self.isLock = 0

	def Marshal(writer):
		writer.setUint8(self.battleType, 1)
		writer.setUint16(self.perRoundTime, 2)
		writer.setUint16(self.endRoundNum, 3)
		writer.setString(self.roomId, 4)
		writer.setUint32(self.levelId, 5)
		writer.setUint32(self.hostId, 6)
		writer.setUint8(self.status, 7)
		countarrRoomPlayerInfo = len(self.arrRoomPlayerInfo)
		writer.setArray(countarrRoomPlayerInfo, 8)
		for i in range(countarrRoomPlayerInfo):
			writer.setMessage(0)
			self.arrRoomPlayerInfo[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint8(self.pvpType, 9)
		writer.setUint8(self.isLock, 10)

	def Unmarshal( reader):
		self.battleType = reader.getUint8(1)
		self.perRoundTime = reader.getUint16(2)
		self.endRoundNum = reader.getUint16(3)
		self.roomId = reader.getString(4)
		self.levelId = reader.getUint32(5)
		self.hostId = reader.getUint32(6)
		self.status = reader.getUint8(7)
		for i in range(reader.getArray(8)):
			msg = RoomPlayerInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrRoomPlayerInfo.append(msg)
		self.pvpType = reader.getUint8(9)
		self.isLock = reader.getUint8(10)
# message PVPGroupInfo
class PVPGroupInfo:
	def __init__(self):
		self.protoid = 0
		self.battleType = 0
		self.pvpType = 0
		self.perRoundTime = 0
		self.endRoundNum = 0
		self.levelId = 0
		self.level = 0
		self.pwScore = 0
		self.goTimes = 0
		self.groupId = ""
		self.roomIds = []
		self.arrRoomPlayerInfo = []

	def Marshal(writer):
		writer.setUint8(self.battleType, 1)
		writer.setUint8(self.pvpType, 2)
		writer.setUint16(self.perRoundTime, 3)
		writer.setUint16(self.endRoundNum, 4)
		writer.setUint32(self.levelId, 5)
		writer.setUint32(self.level, 6)
		writer.setUint32(self.pwScore, 7)
		writer.setUint32(self.goTimes, 8)
		writer.setString(self.groupId, 9)
		countroomIds = len(self.roomIds)
		writer.setArray(countroomIds, 10)
		for i in range(countroomIds):
			writer.setString(self.roomIds[i], 0)
		countarrRoomPlayerInfo = len(self.arrRoomPlayerInfo)
		writer.setArray(countarrRoomPlayerInfo, 11)
		for i in range(countarrRoomPlayerInfo):
			writer.setMessage(0)
			self.arrRoomPlayerInfo[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.battleType = reader.getUint8(1)
		self.pvpType = reader.getUint8(2)
		self.perRoundTime = reader.getUint16(3)
		self.endRoundNum = reader.getUint16(4)
		self.levelId = reader.getUint32(5)
		self.level = reader.getUint32(6)
		self.pwScore = reader.getUint32(7)
		self.goTimes = reader.getUint32(8)
		self.groupId = reader.getString(9)
		for i in range(reader.getArray(10)):
			self.roomIds.append(reader.getString(0))
		for i in range(reader.getArray(11)):
			msg = RoomPlayerInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrRoomPlayerInfo.append(msg)
# message PVERoomInfo
class PVERoomInfo:
	def __init__(self):
		self.protoid = 0
		self.battleType = 0
		self.levelId = 0
		self.arrRoomPlayerInfo = []

	def Marshal(writer):
		writer.setUint8(self.battleType, 1)
		writer.setUint32(self.levelId, 2)
		countarrRoomPlayerInfo = len(self.arrRoomPlayerInfo)
		writer.setArray(countarrRoomPlayerInfo, 3)
		for i in range(countarrRoomPlayerInfo):
			writer.setMessage(0)
			self.arrRoomPlayerInfo[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.battleType = reader.getUint8(1)
		self.levelId = reader.getUint32(2)
		for i in range(reader.getArray(3)):
			msg = RoomPlayerInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrRoomPlayerInfo.append(msg)
# message MailTitle
class MailTitle:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.title = ""
		self.sendTime = 0
		self.state = 0
		self.item_pid = 0
		self.params = ""
		self.code = ""
		self.type = 0
		self.sRid = 0
		self.sName = ""

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setString(self.title, 2)
		writer.setUint32(self.sendTime, 3)
		writer.setUint32(self.state, 4)
		writer.setUint32(self.item_pid, 5)
		writer.setString(self.params, 6)
		writer.setString(self.code, 7)
		writer.setUint8(self.type, 8)
		writer.setUint32(self.sRid, 9)
		writer.setString(self.sName, 10)

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.title = reader.getString(2)
		self.sendTime = reader.getUint32(3)
		self.state = reader.getUint32(4)
		self.item_pid = reader.getUint32(5)
		self.params = reader.getString(6)
		self.code = reader.getString(7)
		self.type = reader.getUint8(8)
		self.sRid = reader.getUint32(9)
		self.sName = reader.getString(10)
# message MailItem
class MailItem:
	def __init__(self):
		self.protoid = 0
		self.item_pid = 0
		self.count = 0

	def Marshal(writer):
		writer.setUint32(self.item_pid, 1)
		writer.setUint32(self.count, 2)

	def Unmarshal( reader):
		self.item_pid = reader.getUint32(1)
		self.count = reader.getUint32(2)
# message MailBody
class MailBody:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.body = ""
		self.items = []
		self.params = ""

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setString(self.body, 2)
		countitems = len(self.items)
		writer.setArray(countitems, 3)
		for i in range(countitems):
			writer.setMessage(0)
			self.items[i].Marshal(writer)
			writer.endSetMessage()
		writer.setString(self.params, 4)

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.body = reader.getString(2)
		for i in range(reader.getArray(3)):
			msg = MailItem() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.items.append(msg)
		self.params = reader.getString(4)
# message Task
class Task:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.f1 = 0
		self.f2 = 0
		self.state = 0
		self.rewardT = 0

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setUint32(self.f1, 2)
		writer.setUint32(self.f2, 3)
		writer.setUint8(self.state, 4)
		writer.setUint8(self.rewardT, 5)

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.f1 = reader.getUint32(2)
		self.f2 = reader.getUint32(3)
		self.state = reader.getUint8(4)
		self.rewardT = reader.getUint8(5)
# message BattleResult
class BattleResult:
	def __init__(self):
		self.protoid = 0
		self.bid = ""
		self.battleType = 0
		self.winTeamId = 0
		self.bType = 0
		self.playerId = 0
		self.name = ""
		self.level = 0
		self.chTimes = 0
		self.score = 0
		self.diffScore = 0
		self.dropItems = []

	def Marshal(writer):
		writer.setString(self.bid, 1)
		writer.setUint8(self.battleType, 2)
		writer.setUint8(self.winTeamId, 3)
		writer.setUint8(self.bType, 4)
		writer.setUint32(self.playerId, 5)
		writer.setString(self.name, 6)
		writer.setUint16(self.level, 7)
		writer.setUint16(self.chTimes, 8)
		writer.setInt32(self.score, 9)
		writer.setInt32(self.diffScore, 10)
		countdropItems = len(self.dropItems)
		writer.setArray(countdropItems, 11)
		for i in range(countdropItems):
			writer.setMessage(0)
			self.dropItems[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.bid = reader.getString(1)
		self.battleType = reader.getUint8(2)
		self.winTeamId = reader.getUint8(3)
		self.bType = reader.getUint8(4)
		self.playerId = reader.getUint32(5)
		self.name = reader.getString(6)
		self.level = reader.getUint16(7)
		self.chTimes = reader.getUint16(8)
		self.score = reader.getInt32(9)
		self.diffScore = reader.getInt32(10)
		for i in range(reader.getArray(11)):
			msg = RewardInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.dropItems.append(msg)
# message RankItem
class RankItem:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.name = ""
		self.level = 0
		self.val = 0
		self.index = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setUint16(self.level, 3)
		writer.setInt32(self.val, 4)
		writer.setInt32(self.index, 5)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.level = reader.getUint16(3)
		self.val = reader.getInt32(4)
		self.index = reader.getInt32(5)
# message FightRankItem
class FightRankItem:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.name = ""
		self.guid = ""
		self.level = 0
		self.fight = 0
		self.rank = 0
		self.heroId = 0
		self.suitId = 0
		self.starNum = 0
		self.oldrank = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setString(self.guid, 3)
		writer.setUint32(self.level, 4)
		writer.setUint32(self.fight, 5)
		writer.setUint32(self.rank, 6)
		writer.setUint32(self.heroId, 7)
		writer.setUint32(self.suitId, 8)
		writer.setUint32(self.starNum, 9)
		writer.setUint32(self.oldrank, 10)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.guid = reader.getString(3)
		self.level = reader.getUint32(4)
		self.fight = reader.getUint32(5)
		self.rank = reader.getUint32(6)
		self.heroId = reader.getUint32(7)
		self.suitId = reader.getUint32(8)
		self.starNum = reader.getUint32(9)
		self.oldrank = reader.getUint32(10)
# message RoseRankItem
class RoseRankItem:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.name = ""
		self.guid = ""
		self.level = 0
		self.count = 0
		self.rank = 0
		self.heroId = 0
		self.suitId = 0
		self.starNum = 0
		self.oldrank = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setString(self.guid, 3)
		writer.setUint32(self.level, 4)
		writer.setUint32(self.count, 5)
		writer.setUint32(self.rank, 6)
		writer.setUint32(self.heroId, 7)
		writer.setUint32(self.suitId, 8)
		writer.setUint32(self.starNum, 9)
		writer.setUint32(self.oldrank, 10)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.guid = reader.getString(3)
		self.level = reader.getUint32(4)
		self.count = reader.getUint32(5)
		self.rank = reader.getUint32(6)
		self.heroId = reader.getUint32(7)
		self.suitId = reader.getUint32(8)
		self.starNum = reader.getUint32(9)
		self.oldrank = reader.getUint32(10)
# message GuildRankItem
class GuildRankItem:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.name = ""
		self.presi_name = ""
		self.level = 0
		self.rank = 0
		self.fight = 0
		self.join = 0
		self.total = 0
		self.moneys = 0
		self.oldrank = 0
		self.mydevote = 0
		self.mircochapter = 0
		self.isdismiss = 0

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setString(self.name, 2)
		writer.setString(self.presi_name, 3)
		writer.setUint32(self.level, 4)
		writer.setUint32(self.rank, 5)
		writer.setUint32(self.fight, 6)
		writer.setUint32(self.join, 7)
		writer.setUint32(self.total, 8)
		writer.setUint32(self.moneys, 9)
		writer.setUint32(self.oldrank, 10)
		writer.setUint32(self.mydevote, 11)
		writer.setUint32(self.mircochapter, 12)
		writer.setBool(self.isdismiss, 13)

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.name = reader.getString(2)
		self.presi_name = reader.getString(3)
		self.level = reader.getUint32(4)
		self.rank = reader.getUint32(5)
		self.fight = reader.getUint32(6)
		self.join = reader.getUint32(7)
		self.total = reader.getUint32(8)
		self.moneys = reader.getUint32(9)
		self.oldrank = reader.getUint32(10)
		self.mydevote = reader.getUint32(11)
		self.mircochapter = reader.getUint32(12)
		self.isdismiss = reader.getBool(13)
# message GuildBuildItem
class GuildBuildItem:
	def __init__(self):
		self.protoid = 0
		self.build_id = 0
		self.level = 0
		self.icon_id = 0

	def Marshal(writer):
		writer.setUint32(self.build_id, 1)
		writer.setUint32(self.level, 2)
		writer.setUint32(self.icon_id, 3)

	def Unmarshal( reader):
		self.build_id = reader.getUint32(1)
		self.level = reader.getUint32(2)
		self.icon_id = reader.getUint32(3)
# message GuildDonateItem
class GuildDonateItem:
	def __init__(self):
		self.protoid = 0
		self.item_pid = 0
		self.times = 0
		self.devote = 0

	def Marshal(writer):
		writer.setUint32(self.item_pid, 1)
		writer.setUint32(self.times, 2)
		writer.setUint32(self.devote, 3)

	def Unmarshal( reader):
		self.item_pid = reader.getUint32(1)
		self.times = reader.getUint32(2)
		self.devote = reader.getUint32(3)
# message GuildItem
class GuildItem:
	def __init__(self):
		self.protoid = 0
		self.gid = 0
		self.name = ""
		self.presi_name = ""
		self.join = 0
		self.total = 0
		self.level_limit = 0
		self.status = 0
		self.level = 0
		self.rank = 0
		self.moneys = 0
		self.devotes = 0
		self.mydevote = 0
		self.placard = ""
		self.mircochapter = 0

	def Marshal(writer):
		writer.setUint32(self.gid, 1)
		writer.setString(self.name, 2)
		writer.setString(self.presi_name, 3)
		writer.setUint32(self.join, 4)
		writer.setUint32(self.total, 5)
		writer.setUint32(self.level_limit, 6)
		writer.setUint8(self.status, 7)
		writer.setUint32(self.level, 8)
		writer.setUint32(self.rank, 9)
		writer.setUint32(self.moneys, 10)
		writer.setUint32(self.devotes, 11)
		writer.setUint32(self.mydevote, 12)
		writer.setString(self.placard, 13)
		writer.setUint32(self.mircochapter, 14)

	def Unmarshal( reader):
		self.gid = reader.getUint32(1)
		self.name = reader.getString(2)
		self.presi_name = reader.getString(3)
		self.join = reader.getUint32(4)
		self.total = reader.getUint32(5)
		self.level_limit = reader.getUint32(6)
		self.status = reader.getUint8(7)
		self.level = reader.getUint32(8)
		self.rank = reader.getUint32(9)
		self.moneys = reader.getUint32(10)
		self.devotes = reader.getUint32(11)
		self.mydevote = reader.getUint32(12)
		self.placard = reader.getString(13)
		self.mircochapter = reader.getUint32(14)
# message GuildJoinItem
class GuildJoinItem:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.name = ""
		self.level = 0
		self.fight = 0
		self.suitId = 0
		self.vipLv = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setUint32(self.level, 3)
		writer.setUint32(self.fight, 4)
		writer.setUint32(self.suitId, 5)
		writer.setUint32(self.vipLv, 6)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.level = reader.getUint32(3)
		self.fight = reader.getUint32(4)
		self.suitId = reader.getUint32(5)
		self.vipLv = reader.getUint32(6)
# message GuildMemeberItem
class GuildMemeberItem:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.role_name = ""
		self.level = 0
		self.last_logout_time = 0
		self.last_login_time = 0
		self.guild_id = 0
		self.guild_hot = 0
		self.guild_attr = 0
		self.fight = 0
		self.guild_devote = 0
		self.heroId = 0
		self.suitId = 0
		self.vipLv = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.role_name, 2)
		writer.setUint32(self.level, 3)
		writer.setUint32(self.last_logout_time, 4)
		writer.setUint32(self.last_login_time, 5)
		writer.setUint32(self.guild_id, 6)
		writer.setUint32(self.guild_hot, 7)
		writer.setUint32(self.guild_attr, 8)
		writer.setUint32(self.fight, 9)
		writer.setUint32(self.guild_devote, 10)
		writer.setUint32(self.heroId, 11)
		writer.setUint32(self.suitId, 12)
		writer.setUint32(self.vipLv, 13)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.role_name = reader.getString(2)
		self.level = reader.getUint32(3)
		self.last_logout_time = reader.getUint32(4)
		self.last_login_time = reader.getUint32(5)
		self.guild_id = reader.getUint32(6)
		self.guild_hot = reader.getUint32(7)
		self.guild_attr = reader.getUint32(8)
		self.fight = reader.getUint32(9)
		self.guild_devote = reader.getUint32(10)
		self.heroId = reader.getUint32(11)
		self.suitId = reader.getUint32(12)
		self.vipLv = reader.getUint32(13)
# message GuildEventParam
class GuildEventParam:
	def __init__(self):
		self.protoid = 0
		self.param1 = ""
		self.param2 = ""
		self.param3 = ""

	def Marshal(writer):
		writer.setString(self.param1, 1)
		writer.setString(self.param2, 2)
		writer.setString(self.param3, 3)

	def Unmarshal( reader):
		self.param1 = reader.getString(1)
		self.param2 = reader.getString(2)
		self.param3 = reader.getString(3)
# message GuildEventItem
class GuildEventItem:
	def __init__(self):
		self.protoid = 0
		self.guild_id = 0
		self.event_type = 0
		self.params = GuildEventParam()
		self.create_time = 0

	def Marshal(writer):
		writer.setUint32(self.guild_id, 1)
		writer.setUint32(self.event_type, 2)
		writer.setMessage(3)
		self.params.Marshal(writer)
		writer.endSetMessage()
		writer.setUint32(self.create_time, 4)

	def Unmarshal( reader):
		self.guild_id = reader.getUint32(1)
		self.event_type = reader.getUint32(2)
		reader.getMessage(3)
		self.params.Unmarshal(reader)
		reader.endGetMessage()
		self.create_time = reader.getUint32(4)
# message Friend
class Friend:
	def __init__(self):
		self.protoid = 0
		self.rid = 0
		self.name = ""
		self.level = 0
		self.fightVal = 0
		self.lastLoginT = 0
		self.suitId = 0
		self.time = 0
		self.id = 0
		self.vip = 0
		self.love = 0

	def Marshal(writer):
		writer.setUint32(self.rid, 1)
		writer.setString(self.name, 2)
		writer.setUint16(self.level, 3)
		writer.setUint32(self.fightVal, 4)
		writer.setUint32(self.lastLoginT, 5)
		writer.setUint32(self.suitId, 6)
		writer.setUint32(self.time, 7)
		writer.setUint64(self.id, 8)
		writer.setUint16(self.vip, 9)
		writer.setUint32(self.love, 10)

	def Unmarshal( reader):
		self.rid = reader.getUint32(1)
		self.name = reader.getString(2)
		self.level = reader.getUint16(3)
		self.fightVal = reader.getUint32(4)
		self.lastLoginT = reader.getUint32(5)
		self.suitId = reader.getUint32(6)
		self.time = reader.getUint32(7)
		self.id = reader.getUint64(8)
		self.vip = reader.getUint16(9)
		self.love = reader.getUint32(10)
# message ChatParam
class ChatParam:
	def __init__(self):
		self.protoid = 0
		self.key = ""
		self.val = ""

	def Marshal(writer):
		writer.setString(self.key, 1)
		writer.setString(self.val, 2)

	def Unmarshal( reader):
		self.key = reader.getString(1)
		self.val = reader.getString(2)
# message ChatInfo
class ChatInfo:
	def __init__(self):
		self.protoid = 0
		self.msg_type = 0
		self.data_type = 0
		self.content = ""
		self.audio_path = ""
		self.audio_time = 0
		self.send_playerId = 0
		self.send_playerName = ""
		self.templateId = 0
		self.params = []
		self.vipLv = 0
		self.currentHeroId = 0
		self.currentHeroSuitId = 0
		self.target_playerIds = []
		self.teamId = 0
		self.id = ""
		self.createtime = 0

	def Marshal(writer):
		writer.setUint32(self.msg_type, 1)
		writer.setUint8(self.data_type, 2)
		writer.setString(self.content, 3)
		writer.setString(self.audio_path, 4)
		writer.setUint32(self.audio_time, 5)
		writer.setUint32(self.send_playerId, 6)
		writer.setString(self.send_playerName, 7)
		writer.setUint32(self.templateId, 8)
		countparams = len(self.params)
		writer.setArray(countparams, 9)
		for i in range(countparams):
			writer.setMessage(0)
			self.params[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint16(self.vipLv, 10)
		writer.setUint32(self.currentHeroId, 11)
		writer.setUint32(self.currentHeroSuitId, 12)
		counttarget_playerIds = len(self.target_playerIds)
		writer.setArray(counttarget_playerIds, 13)
		for i in range(counttarget_playerIds):
			writer.setUint32(self.target_playerIds[i], 0)
		writer.setUint64(self.teamId, 14)
		writer.setString(self.id, 15)
		writer.setInt32(self.createtime, 16)

	def Unmarshal( reader):
		self.msg_type = reader.getUint32(1)
		self.data_type = reader.getUint8(2)
		self.content = reader.getString(3)
		self.audio_path = reader.getString(4)
		self.audio_time = reader.getUint32(5)
		self.send_playerId = reader.getUint32(6)
		self.send_playerName = reader.getString(7)
		self.templateId = reader.getUint32(8)
		for i in range(reader.getArray(9)):
			msg = ChatParam() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.params.append(msg)
		self.vipLv = reader.getUint16(10)
		self.currentHeroId = reader.getUint32(11)
		self.currentHeroSuitId = reader.getUint32(12)
		for i in range(reader.getArray(13)):
			self.target_playerIds.append(reader.getUint32(0))
		self.teamId = reader.getUint64(14)
		self.id = reader.getString(15)
		self.createtime = reader.getInt32(16)
# message SavenActivity
class SavenActivity:
	def __init__(self):
		self.protoid = 0
		self.isOpen = 0
		self.isReward = 0
		self.date = 0

	def Marshal(writer):
		writer.setBool(self.isOpen, 1)
		writer.setBool(self.isReward, 2)
		writer.setUint32(self.date, 3)

	def Unmarshal( reader):
		self.isOpen = reader.getBool(1)
		self.isReward = reader.getBool(2)
		self.date = reader.getUint32(3)
# message TalkTeam
class TalkTeam:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.name = ""
		self.ann = ""
		self.host = 0
		self.mems = []

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setString(self.name, 2)
		writer.setString(self.ann, 3)
		writer.setUint32(self.host, 4)
		countmems = len(self.mems)
		writer.setArray(countmems, 5)
		for i in range(countmems):
			writer.setMessage(0)
			self.mems[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.name = reader.getString(2)
		self.ann = reader.getString(3)
		self.host = reader.getUint32(4)
		for i in range(reader.getArray(5)):
			msg = Friend() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.mems.append(msg)
# message SimpleData
class SimpleData:
	def __init__(self):
		self.protoid = 0
		self.key = ""
		self.values = []

	def Marshal(writer):
		writer.setString(self.key, 1)
		countvalues = len(self.values)
		writer.setArray(countvalues, 2)
		for i in range(countvalues):
			writer.setString(self.values[i], 0)

	def Unmarshal( reader):
		self.key = reader.getString(1)
		for i in range(reader.getArray(2)):
			self.values.append(reader.getString(0))
# message ActivityTick
class ActivityTick:
	def __init__(self):
		self.protoid = 0
		self.Parameter1 = 0
		self.Parameter2 = 0
		self.Parameter3 = 0

	def Marshal(writer):
		writer.setUint32(self.Parameter1, 1)
		writer.setUint32(self.Parameter2, 2)
		writer.setUint32(self.Parameter3, 3)

	def Unmarshal( reader):
		self.Parameter1 = reader.getUint32(1)
		self.Parameter2 = reader.getUint32(2)
		self.Parameter3 = reader.getUint32(3)
# message Activity
class Activity:
	def __init__(self):
		self.protoid = 0
		self.activity_id = 0
		self.create_time = 0
		self.state = 0
		self.ticks = []
		self.rewardT = 0
		self.rewardC = 0
		self.name = ""
		self.body = ""
		self.conditions = []
		self.opening_time = 0
		self.end_time = 0
		self.effective_time = ""
		self.completion_time = ""
		self.interval = 0
		self.pccurrence_date = []
		self.collection_times = 0
		self.template_id = 0
		self.front = 0
		self.display = 0
		self.items = ""
		self.reciprocal = 0

	def Marshal(writer):
		writer.setUint32(self.activity_id, 1)
		writer.setUint32(self.create_time, 2)
		writer.setUint8(self.state, 3)
		countticks = len(self.ticks)
		writer.setArray(countticks, 4)
		for i in range(countticks):
			writer.setMessage(0)
			self.ticks[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint8(self.rewardT, 5)
		writer.setUint8(self.rewardC, 6)
		writer.setString(self.name, 7)
		writer.setString(self.body, 8)
		countconditions = len(self.conditions)
		writer.setArray(countconditions, 9)
		for i in range(countconditions):
			writer.setMessage(0)
			self.conditions[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint8(self.opening_time, 10)
		writer.setUint8(self.end_time, 11)
		writer.setString(self.effective_time, 12)
		writer.setString(self.completion_time, 13)
		writer.setUint8(self.interval, 14)
		countpccurrence_date = len(self.pccurrence_date)
		writer.setArray(countpccurrence_date, 15)
		for i in range(countpccurrence_date):
			writer.setUint8(self.pccurrence_date[i], 0)
		writer.setUint8(self.collection_times, 16)
		writer.setUint8(self.template_id, 17)
		writer.setUint8(self.front, 18)
		writer.setUint8(self.display, 19)
		writer.setString(self.items, 20)
		writer.setUint8(self.reciprocal, 21)

	def Unmarshal( reader):
		self.activity_id = reader.getUint32(1)
		self.create_time = reader.getUint32(2)
		self.state = reader.getUint8(3)
		for i in range(reader.getArray(4)):
			msg = ActivityTick() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.ticks.append(msg)
		self.rewardT = reader.getUint8(5)
		self.rewardC = reader.getUint8(6)
		self.name = reader.getString(7)
		self.body = reader.getString(8)
		for i in range(reader.getArray(9)):
			msg = ActivityTick() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.conditions.append(msg)
		self.opening_time = reader.getUint8(10)
		self.end_time = reader.getUint8(11)
		self.effective_time = reader.getString(12)
		self.completion_time = reader.getString(13)
		self.interval = reader.getUint8(14)
		for i in range(reader.getArray(15)):
			self.pccurrence_date.append(reader.getUint8(0))
		self.collection_times = reader.getUint8(16)
		self.template_id = reader.getUint8(17)
		self.front = reader.getUint8(18)
		self.display = reader.getUint8(19)
		self.items = reader.getString(20)
		self.reciprocal = reader.getUint8(21)
# message MoreHeroPub
class MoreHeroPub:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.rid = 0
		self.hero_id = 0
		self.heros = []
		self.today_level = 0
		self.history_level = 0
		self.reset_times = 0
		self.enter_times = 0
		self.create_time = 0
		self.update_time = 0
		self.npcInfo = []

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setUint32(self.rid, 2)
		writer.setUint32(self.hero_id, 3)
		countheros = len(self.heros)
		writer.setArray(countheros, 4)
		for i in range(countheros):
			writer.setMessage(0)
			self.heros[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.today_level, 5)
		writer.setUint32(self.history_level, 6)
		writer.setUint32(self.reset_times, 7)
		writer.setUint32(self.enter_times, 8)
		writer.setUint32(self.create_time, 9)
		writer.setUint32(self.update_time, 10)
		countnpcInfo = len(self.npcInfo)
		writer.setArray(countnpcInfo, 11)
		for i in range(countnpcInfo):
			writer.setMessage(0)
			self.npcInfo[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.rid = reader.getUint32(2)
		self.hero_id = reader.getUint32(3)
		for i in range(reader.getArray(4)):
			msg = MoreHeroInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.heros.append(msg)
		self.today_level = reader.getUint32(5)
		self.history_level = reader.getUint32(6)
		self.reset_times = reader.getUint32(7)
		self.enter_times = reader.getUint32(8)
		self.create_time = reader.getUint32(9)
		self.update_time = reader.getUint32(10)
		for i in range(reader.getArray(11)):
			msg = MoreNpcInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.npcInfo.append(msg)
# message MoreHeroGoods
class MoreHeroGoods:
	def __init__(self):
		self.protoid = 0
		self.item_id = 0
		self.numbers = 0
		self.times = 0

	def Marshal(writer):
		writer.setUint32(self.item_id, 1)
		writer.setUint32(self.numbers, 2)
		writer.setUint32(self.times, 3)

	def Unmarshal( reader):
		self.item_id = reader.getUint32(1)
		self.numbers = reader.getUint32(2)
		self.times = reader.getUint32(3)
# message MoreHeroSweepResult
class MoreHeroSweepResult:
	def __init__(self):
		self.protoid = 0
		self.levelId = 0
		self.drops = []

	def Marshal(writer):
		writer.setUint32(self.levelId, 1)
		countdrops = len(self.drops)
		writer.setArray(countdrops, 2)
		for i in range(countdrops):
			writer.setMessage(0)
			self.drops[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.levelId = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			msg = RewardInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.drops.append(msg)
# message MoreHeroItem
class MoreHeroItem:
	def __init__(self):
		self.protoid = 0
		self.item_pid = 0
		self.count = 0

	def Marshal(writer):
		writer.setUint32(self.item_pid, 1)
		writer.setUint32(self.count, 2)

	def Unmarshal( reader):
		self.item_pid = reader.getUint32(1)
		self.count = reader.getUint32(2)
# message PubliPlayerInfo
class PubliPlayerInfo:
	def __init__(self):
		self.protoid = 0
		self.name = ""
		self.level = 0
		self.fight = 0
		self.vipLv = 0
		self.guildName = ""
		self.paiwei = 0
		self.attack = 0
		self.defense = 0
		self.life = 0
		self.agility = 0
		self.heroId = 0
		self.suitId = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setString(self.name, 1)
		writer.setUint32(self.level, 2)
		writer.setUint32(self.fight, 3)
		writer.setUint32(self.vipLv, 4)
		writer.setString(self.guildName, 5)
		writer.setUint32(self.paiwei, 6)
		writer.setUint32(self.attack, 7)
		writer.setUint32(self.defense, 8)
		writer.setUint32(self.life, 9)
		writer.setUint32(self.agility, 10)
		writer.setUint32(self.heroId, 11)
		writer.setUint32(self.suitId, 12)
		writer.setUint32(self.playerId, 13)

	def Unmarshal( reader):
		self.name = reader.getString(1)
		self.level = reader.getUint32(2)
		self.fight = reader.getUint32(3)
		self.vipLv = reader.getUint32(4)
		self.guildName = reader.getString(5)
		self.paiwei = reader.getUint32(6)
		self.attack = reader.getUint32(7)
		self.defense = reader.getUint32(8)
		self.life = reader.getUint32(9)
		self.agility = reader.getUint32(10)
		self.heroId = reader.getUint32(11)
		self.suitId = reader.getUint32(12)
		self.playerId = reader.getUint32(13)
# message GuildTask
class GuildTask:
	def __init__(self):
		self.protoid = 0
		self.id = 0
		self.f = 0
		self.state = 0
		self.rid = 0
		self.name = ""

	def Marshal(writer):
		writer.setUint32(self.id, 1)
		writer.setUint32(self.f, 2)
		writer.setUint8(self.state, 3)
		writer.setUint32(self.rid, 4)
		writer.setString(self.name, 5)

	def Unmarshal( reader):
		self.id = reader.getUint32(1)
		self.f = reader.getUint32(2)
		self.state = reader.getUint8(3)
		self.rid = reader.getUint32(4)
		self.name = reader.getString(5)
# message Activity7
class Activity7:
	def __init__(self):
		self.protoid = 0
		self.activityId = 0
		self.f = 0
		self.rewardT = 0

	def Marshal(writer):
		writer.setUint32(self.activityId, 1)
		writer.setUint32(self.f, 2)
		writer.setUint32(self.rewardT, 3)

	def Unmarshal( reader):
		self.activityId = reader.getUint32(1)
		self.f = reader.getUint32(2)
		self.rewardT = reader.getUint32(3)
# message SingleSweepResult
class SingleSweepResult:
	def __init__(self):
		self.protoid = 0
		self.index = 0
		self.drops = []

	def Marshal(writer):
		writer.setUint32(self.index, 1)
		countdrops = len(self.drops)
		writer.setArray(countdrops, 2)
		for i in range(countdrops):
			writer.setMessage(0)
			self.drops[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.index = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			msg = RewardInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.drops.append(msg)
# message TeamItem
class TeamItem:
	def __init__(self):
		self.protoid = 0
		self.teamId = 0
		self.type = 0
		self.activited = 0

	def Marshal(writer):
		writer.setUint32(self.teamId, 1)
		writer.setUint32(self.type, 2)
		writer.setBool(self.activited, 3)

	def Unmarshal( reader):
		self.teamId = reader.getUint32(1)
		self.type = reader.getUint32(2)
		self.activited = reader.getBool(3)
